libxl: refactor DISK_BACKEND_PHY handling in libxl_device_disk_add
authorIan Campbell <ian.campbell@citrix.com>
Fri, 8 Apr 2011 15:39:53 +0000 (16:39 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 8 Apr 2011 15:39:53 +0000 (16:39 +0100)
commitbdd91be4931fce7caea91f9614c12b4ff335f821
tree59c502cce5e0cfbc1f59d0d4e2a6f01fbefbb689
parent44714d9fb796f13c8854aba9d6fdf1d32cb0432f
libxl: refactor DISK_BACKEND_PHY handling in libxl_device_disk_add

A step on the path to sharing this code with the tail-end of the
DISK_BACKEND_TAP case.

I made the result of libxl__blktap_devpath non-const to achieve
this. The existing caller calls libxl__strdup on the result but since
the function is an internal one and the result is already garbage
collected I think this is unnecessary and we can just use the
non-const result directly.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/libxl.c
tools/libxl/libxl_blktap2.c
tools/libxl/libxl_internal.h
tools/libxl/libxl_noblktap2.c